home *** CD-ROM | disk | FTP | other *** search
- /*irotl function, from p. 222 of turboc bible */
- #include<stdio.h>
- #include<stdlib.h>
- main()
- {
- char input[80];
- int bits;
- unsigned long value;
- char **eptr;
-
- printf("enter long integer to rotate (in hex):");
- gets(input);
- value = strtoul(input, eptr, 16);
- for(bits = 1; bits < 33; bits++)
- printf("%#8.8lx roteted left by %dd bits = %#8.8lx\n",
- value, bits, _lrotl(value, bits));
- }